#include <cstdlib>
#include <stdio.h>
#include <cmath>

int main(int argc, char** argv)
{
	int centerX = atoi(argv[1]);
	int centerY = atoi(argv[2]);
	int centerZ = atoi(argv[3]);
	int pixelCount = 0;
	double x,y,z;
	double radius = atof(argv[4]);

	FILE* file;

	file = fopen("spherePixels", "w");

	for(double azimuth = 0.0; azimuth < 180.0; azimuth += 0.5)
	{
		for(double polar = 0.0; polar < 90.0; polar += 0.5)
		{
			x = centerX + radius * sin(azimuth) * cos(polar);
			y = centerY + radius * sin(azimuth) * sin(polar);
			z = centerZ + radius * cos(azimuth);

			fprintf(file,"%f %f %f\n", x,y,z);
		}
	}
	
	fclose(file);

	

	return 0;
}


